home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
8
/
analyser.zip
/
ANALYSER.DOC
< prev
Wrap
Text File
|
1986-08-13
|
6KB
|
152 lines
ANALYSER - A diskette utility program. V1.2
--------
Purpose:
This program will detect and report bad sectors on a
floppy diskette.
Errors detected and reported are as follows:-
1. Sectors with CRC errors.
2. Unusual sector sizes (not 512 bytes).
3. Missing address marks.
4. Missing sectors. (The actual sectors present are reported).
5. ID's that do not match the real track address.
6. Diskettes where the formatting is a bit strange
such as overlapping sectors or tracks with more
than 5120 bytes of data.
7. Duplicate ID's on a given track.
8. Invalid Head numbers in ID's
===============================================================================
Methodology:
A multi-sector read is performed for the current track.
This is done firstly for 10 sectors to accomodate DOS 3.11.
If this fails, the I/O is repeated for only 9 sectors.
If this also fails, then an 8 sector read is issued.
In the case where this fails, then special processing occurs.
===============================================================================
Special Processing:
In the case of a multi-sector read failure, the track is read
1 sector at a time.
This is done using the sector and size provided by the ID read.
All errors detected on that sector are reported.
At the same time, any other errors that could have caused the
multi-sector read to fail, such as CRC error or MISSING ADDRESS
MARK, are reported.
This allows you to identify bad sectors on a diskette you could
process yesterday but cannot today.
The author has 'saved' many a diskette-full of data using this
program as a first step. The second step, by the way, is in my
case DEBUG. Assemble, using DEBUG, an INT 13 at location 100H.
Then set AX = 201 (read 1 sector) and CX = XX0Y (where XX = the
required track in hex and Y = the required sector #). Then set
ES = the next whole thousand above CS. For example, if CS = 1c10
then set ES = 2000. Now simply enter g102 and the required sector
will be read into segment 2000. If the sector truely had a bad
CRC, then after the read, AX should = 1000 (CRC error).
So, to correct your bad data disk, simply re-enter all of the
above with one modification - AX = 301 = write instead of read.
Now you will rewrite the errant sector with a good CRC and, with
any luck, be able to process the data contained in it.
===============================================================================
WARNING:
Be sure to check, if possible, that the data is in fact correct
before closing any multi-million dollar deals based on it.
===============================================================================
USE:
Everything that you may want to select is MENU selectable.
Automatic - Choosing this option causes an analysis of the entire
diskette.
Manual - This option does no more for you than Automatic.
However, you get to select the starting and ending
tracks to be analysed.
Output - You may toggle this option between screen, printer or
both. It simply pre-determines where the results will
be displayed.
===============================================================================
Explanation of the Output:
CRC error - A 'checksum' of the bits read from the sector did
not agree with the 'checksum' value written to the
disk when the sector was written.
Abnormal Sector Size:
In DOS, all sectors written are 512 Bytes in length.
This error reports that a sector has a length other
than 512 bytes.
Missing Address Mark:
Every 'NORMAL' sector on disk has the format of ID
followed by data. The ID is the Cyl, Head, Sector #
and the Size of the sector. This is followed by the
data. The 'Start-of-data' is denoted by a special
byte which, if you could read it, would appear as
a 'FB' (hex) but in fact is a strange byte written
with the 'clock bits' inverted.
This byte is the 'ADDRESS MARK' and this error tells
you that this byte could not be found.
i.e. It is missing.
Duplicate Sector ID's:
Sectors on a 'NORMAL' track are numbered from 1 to
either 8 or 9 (or possibly 10 for DOS 311).
This error reports that two or more sectors on the
track being processed have the same sector number.
No further analysis is done (in this release).
Sector ID does not match Track:
As explained above, each sector of data is preceded
by its ID. Part of this ID is the Cyl # on which
the sector resides.
This error message reports that a sector has been
found where the Cyl part of the ID 'says' that the
sector is in fact on a different track.
Invalid Head in ID:
The ID for a given sector consists of the Cylinder (C)
the Head (H), the Record or Sector (R) and the Size (N).
This CHRN is supposed to be unique for each sector.
The error detected indicates that the (H) portion of the
ID does not match the side the sector is on. Since there
are only 2 sides to a diskette, and they are numbered
0 and 1, then if the (H) value read does not match the
Side or is greater than 1 then it is invalid.
===============================================================================
In Conclusion:
As well as being able to report errors on your data diskettes,
this program will, of course, identify protection schemes used
on a variety of copy protected diskettes. This was NOT its intent.
However, since I have not included any code capable of writing
to a diskette, I believe I am not assisting anyone in violating
a protection scheme.
===============================================================================